package com.dks;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.Filter;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;

//import com.dks.filter.AuthFilter;

/**
 * @author Ah Nan
 * @date 2020/4/15
 */
@SpringBootApplication
public class QiestarMain {
    public static void main(String[] args) {
        SpringApplication.run(QiestarMain.class, args);
    }

//    //注册filter
//    @Bean
//    public FilterRegistrationBean filterRegistrationBean() {
//        FilterRegistrationBean registrationBean = new FilterRegistrationBean();
//        registrationBean.setFilter(this.AuthFilter());
//        List<String> urlPatterns = new ArrayList<>();
//        //对所有接口进行校验
//        urlPatterns.add("/*");
//        registrationBean.setUrlPatterns(urlPatterns);
//        return registrationBean;
//    }
//
//    @Bean
//    public Filter AuthFilter() {
//        return new AuthFilter();
//    }
}
